
package com.scs.application.config;

import com.scs.application.core.aliyun.annotation.EnableAliyunOss;
import com.scs.application.core.annotation.EnableDefaultCoreConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Description:
 */

@Configuration
@EnableTransactionManagement
@EnableScheduling
@EnableAliyunOss
@EnableDefaultCoreConfig
public class  AppConfig {
    @Bean
    public TaskScheduler taskScheduler(){
        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
        taskScheduler.setPoolSize(10);
        taskScheduler.setThreadNamePrefix("spring-task");
        return taskScheduler;
    }

}
